﻿// ===============================================================================
// RouteValueDictionary.cs
// EOS Web Framework
// ===============================================================================
// Copyright (c) EOS Development Group. All rights reserved.
// ===============================================================================

namespace EOS.Framework.Contracts.Web.Routing
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;

    /// <summary>
    /// Represents a list of route values.
    /// </summary>
    [Serializable]
    public class RouteValueDictionary : Dictionary<string, object>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RouteValueDictionary"/> class.
        /// </summary>
        public RouteValueDictionary()
            : base(StringComparer.OrdinalIgnoreCase)
        { 
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RouteValueDictionary"/> class
        /// that contains elements copied from the specified dictionary. 
        /// </summary>
        /// <param name="dictionary">The dictionary whose elements are copied to the new one.</param>
        public RouteValueDictionary(IDictionary<string, object> dictionary)
            : base(dictionary, StringComparer.OrdinalIgnoreCase)
        { 
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="RouteValueDictionary"/> class with serialization data.
        /// </summary>
        /// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo"/> object 
        /// containing the information required to serialize the <see cref="T:System.Collections.Generic.Dictionary`2"/>.</param>
        /// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext"/> structure 
        /// containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Generic.Dictionary`2"/>.</param>
        protected RouteValueDictionary(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
